package com.starry.core.common.domain.qo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * 排序字段
 *
 * @Author xiaoke
 */
@Schema(name = "排序字段")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class SortingField implements Serializable {
    /**
     * 顺序 - 升序
     */
    public static final String ORDER_ASC = "asc";
    /**
     * 顺序 - 降序
     */
    public static final String ORDER_DESC = "desc";

    /**
     * 字段
     */
    @Schema(name = "字段")
    private String field;
    /**
     * 顺序
     */
    @Schema(name = "顺序（asc-升序、desc-降序）")
    private String order;
}
